package com.css.zfzx.fwsjcj.modules.reinforce.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.format.annotation.DateTimeFormat;

import javax.persistence.*;
import java.util.Date;
import java.util.Objects;

/**
 * @author leon
 * @Title:
 * @Description: 房屋设施工程数据表：加固工程或者新建工程
 * @date 2020/9/3 15:00
 */
@Entity
@Table(name = "fw_reinforce", schema = "fwsjcj", catalog = "")
public class FwReinforceEntity {
    private String id;
    /**
     * 项目类型：0加固工程，1新建工程
     */
    private String projectType;
    /**
     * 工程编号
     */
    private String number;
    /**
     * 工程名称
     */
    private String name;
    /**
     * 省
     */
    private String province;
    /**
     * 市
     */
    private String city;
    /**
     * 区县
     */
    private String area;
    /**
     * 经度
     */
    private String longitude;
    /**
     * 纬度
     */
    private String latitude;
    /**
     * 工程地址
     */
    private String address;
    /**
     * 工程类别
     */
    private String category;
    /**
     * 工程类型
     */
    private String type;
    /**
     * 工程类型为其他时补充
     */
    private String typeSupplement;
    /**
     * 避难所面积（km2）
     */
    private String shelterArea;
    /**
     * 避难所可容纳人数(人)
     */
    private String shelterGalleryful;
    /**
     * 避难所是否有生活设施
     */
    private String isShelterHaveLivingFacilities;
    /**
     * 避难所原厂址用途:（选项：公园，学校，场馆，其他）
     */
    private String shelterOriginalPurpose;
    /**
     * 避难所原厂址用途:为其他时的补充说明
     */
    private String shelterOriginalPurposeSupplement;
    /**
     * 加固方式(一级选项)
     */
    private String measure;
    /**
     * 加固方式（二级选项）
     */
    private String measureSecond;
    /**
     * 加固方式（三级选项：其他补充）
     */
    private String measureSupplement;
    /**
     * 加固工程时为：工程完成时间 新建工程时为：竣工时间 （批注：公用字段，展示含义不太一样）
     * 只存年月，数据库只能用varchar接收
     */
    private String reinforceTime;
    /**
     * 抗震设防情况:6-9度（选项）
     */
    private String fortificationIntensity;
    /**
     * 施工前图片
     */
    private String pictureBeforeConstruction;
    /**
     * 施工过程图片
     */
    private String pictureProcessConstruction;
    /**
     * 竣工图片/工程照片
     */
    private String pictureCompleteConstruction;
    /**
     * 创建人（或者数据采集人）
     */
    private String createUser;
    /**
     * 创建人ID
     */
    private String createId;
    /**
     * 创建日期
     */
    private Date createTime;
    /**
     * 状态：0未提交，1待审核，2审核不通过，3审核通过
     */
    private String status;
    /**
     * 审核未通过原因
     */
    private String reason;

    /**
     * 审核时间
     */
    private Date checkTime;
    /**
     * 提交时间
     **/
    private Date submitTime;

    /**
     * 表单是否填写完全，0否， 1是
     */
    private String isSaveAll;
    /**
     * 删除标记，0未删除， 1已删除
     */
    private String delFlag;

    @Id
    @Column(name = "id")
    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    @Basic
    @Column(name = "number")
    public String getNumber() {
        return number;
    }

    public void setNumber(String number) {
        this.number = number;
    }

    @Basic
    @Column(name = "name")
    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    @Basic
    @Column(name = "province")
    public String getProvince() {
        return province;
    }

    public void setProvince(String province) {
        this.province = province;
    }

    @Basic
    @Column(name = "city")
    public String getCity() {
        return city;
    }

    public void setCity(String city) {
        this.city = city;
    }

    @Basic
    @Column(name = "area")
    public String getArea() {
        return area;
    }

    public void setArea(String area) {
        this.area = area;
    }

    @Basic
    @Column(name = "longitude")
    public String getLongitude() {
        return longitude;
    }

    public void setLongitude(String longitude) {
        this.longitude = longitude;
    }

    @Basic
    @Column(name = "latitude")
    public String getLatitude() {
        return latitude;
    }

    public void setLatitude(String latitude) {
        this.latitude = latitude;
    }

    @Basic
    @Column(name = "address")
    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        this.address = address;
    }

    @Basic
    @Column(name = "category")
    public String getCategory() {
        return category;
    }

    public void setCategory(String category) {
        this.category = category;
    }

    @Basic
    @Column(name = "type")
    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    @Basic
    @Column(name = "type_supplement")
    public String getTypeSupplement() {
        return typeSupplement;
    }

    public void setTypeSupplement(String typeSupplement) {
        this.typeSupplement = typeSupplement;
    }

    @Basic
    @Column(name = "measure")
    public String getMeasure() {
        return measure;
    }

    public void setMeasure(String measure) {
        this.measure = measure;
    }

    @Basic
    @Column(name = "measure_second")
    public String getMeasureSecond() {
        return measureSecond;
    }

    public void setMeasureSecond(String measureSecond) {
        this.measureSecond = measureSecond;
    }

    @Basic
    @Column(name = "measure_supplement")
    public String getMeasureSupplement() {
        return measureSupplement;
    }

    public void setMeasureSupplement(String measureSupplement) {
        this.measureSupplement = measureSupplement;
    }

    @Basic
    @Column(name = "reinforce_time")
    public String getReinforceTime() {
        return reinforceTime;
    }

    public void setReinforceTime(String reinforceTime) {
        this.reinforceTime = reinforceTime;
    }

    @Basic
    @Column(name = "picture_before_construction")
    public String getPictureBeforeConstruction() {
        return pictureBeforeConstruction;
    }

    public void setPictureBeforeConstruction(String pictureBeforeConstruction) {
        this.pictureBeforeConstruction = pictureBeforeConstruction;
    }

    @Basic
    @Column(name = "picture_process_construction")
    public String getPictureProcessConstruction() {
        return pictureProcessConstruction;
    }

    public void setPictureProcessConstruction(String pictureProcessConstruction) {
        this.pictureProcessConstruction = pictureProcessConstruction;
    }

    @Basic
    @Column(name = "picture_complete_construction")
    public String getPictureCompleteConstruction() {
        return pictureCompleteConstruction;
    }

    public void setPictureCompleteConstruction(String pictureCompleteConstruction) {
        this.pictureCompleteConstruction = pictureCompleteConstruction;
    }

    @Basic
    @Column(name = "create_user")
    public String getCreateUser() {
        return createUser;
    }

    public void setCreateUser(String createUser) {
        this.createUser = createUser;
    }

    @Basic
    @Column(name = "create_id")
    public String getCreateId() {
        return createId;
    }

    public void setCreateId(String createId) {
        this.createId = createId;
    }

    @Basic
    @Column(name = "create_time")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    @Basic
    @Column(name = "status")
    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    @Basic
    @Column(name = "check_time")
    public Date getCheckTime() {
        return checkTime;
    }
    public void setCheckTime(Date checkTime) {
        this.checkTime = checkTime;
    }

    @Basic
    @Column(name = "submit_time")
    public Date getSubmitTime() {
        return submitTime;
    }
    public void setSubmitTime(Date submitTime) {
        this.submitTime = submitTime;
    }

    @Basic
    @Column(name = "reason")
    public String getReason() {
        return reason;
    }

    public void setReason(String reason) {
        this.reason = reason;
    }

    @Basic
    @Column(name = "del_flag")
    public String getDelFlag() {
        return delFlag;
    }

    public void setDelFlag(String delFlag) {
        this.delFlag = delFlag;
    }

    @Basic
    @Column(name = "project_type")
    public String getProjectType() {
        return projectType;
    }

    public void setProjectType(String projectType) {
        this.projectType = projectType;
    }

    @Basic
    @Column(name = "shelter_area")
    public String getShelterArea() {
        return shelterArea;
    }

    public void setShelterArea(String shelterArea) {
        this.shelterArea = shelterArea;
    }

    @Basic
    @Column(name = "shelter_galleryful")
    public String getShelterGalleryful() {
        return shelterGalleryful;
    }

    public void setShelterGalleryful(String shelterGalleryful) {
        this.shelterGalleryful = shelterGalleryful;
    }

    @Basic
    @Column(name = "is_shelter_have_living_facilities")
    public String getIsShelterHaveLivingFacilities() {
        return isShelterHaveLivingFacilities;
    }

    public void setIsShelterHaveLivingFacilities(String isShelterHaveLivingFacilities) {
        this.isShelterHaveLivingFacilities = isShelterHaveLivingFacilities;
    }

    @Basic
    @Column(name = "shelter_original_purpose")
    public String getShelterOriginalPurpose() {
        return shelterOriginalPurpose;
    }

    public void setShelterOriginalPurpose(String shelterOriginalPurpose) {
        this.shelterOriginalPurpose = shelterOriginalPurpose;
    }

    @Basic
    @Column(name = "shelter_original_purpose_supplement")
    public String getShelterOriginalPurposeSupplement() {
        return shelterOriginalPurposeSupplement;
    }

    public void setShelterOriginalPurposeSupplement(String shelterOriginalPurposeSupplement) {
        this.shelterOriginalPurposeSupplement = shelterOriginalPurposeSupplement;
    }

    @Basic
    @Column(name = "fortification_intensity")
    public String getFortificationIntensity() {
        return fortificationIntensity;
    }

    public void setFortificationIntensity(String fortificationIntensity) {
        this.fortificationIntensity = fortificationIntensity;
    }

    @Basic
    @Column(name = "is_save_all")
    public String getIsSaveAll() {
        return isSaveAll;
    }

    public void setIsSaveAll(String isSaveAll) {
        this.isSaveAll = isSaveAll;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        FwReinforceEntity that = (FwReinforceEntity) o;
        return Objects.equals(id, that.id) &&
                Objects.equals(projectType, that.projectType) &&
                Objects.equals(number, that.number) &&
                Objects.equals(name, that.name) &&
                Objects.equals(province, that.province) &&
                Objects.equals(city, that.city) &&
                Objects.equals(area, that.area) &&
                Objects.equals(longitude, that.longitude) &&
                Objects.equals(latitude, that.latitude) &&
                Objects.equals(address, that.address) &&
                Objects.equals(category, that.category) &&
                Objects.equals(type, that.type) &&
                Objects.equals(typeSupplement, that.typeSupplement) &&
                Objects.equals(shelterArea, that.shelterArea) &&
                Objects.equals(shelterGalleryful, that.shelterGalleryful) &&
                Objects.equals(isShelterHaveLivingFacilities, that.isShelterHaveLivingFacilities) &&
                Objects.equals(shelterOriginalPurpose, that.shelterOriginalPurpose) &&
                Objects.equals(shelterOriginalPurposeSupplement, that.shelterOriginalPurposeSupplement) &&
                Objects.equals(measure, that.measure) &&
                Objects.equals(measureSecond, that.measureSecond) &&
                Objects.equals(measureSupplement, that.measureSupplement) &&
                Objects.equals(reinforceTime, that.reinforceTime) &&
                Objects.equals(fortificationIntensity, that.fortificationIntensity) &&
                Objects.equals(pictureBeforeConstruction, that.pictureBeforeConstruction) &&
                Objects.equals(pictureProcessConstruction, that.pictureProcessConstruction) &&
                Objects.equals(pictureCompleteConstruction, that.pictureCompleteConstruction) &&
                Objects.equals(createUser, that.createUser) &&
                Objects.equals(createId, that.createId) &&
                Objects.equals(createTime, that.createTime) &&
                Objects.equals(status, that.status) &&
                Objects.equals(reason, that.reason) &&
                Objects.equals(isSaveAll, that.isSaveAll) &&
                Objects.equals(delFlag, that.delFlag);
    }

    @Override
    public int hashCode() {
        return Objects.hash(id, projectType, number, name, province, city, area, longitude, latitude, address, category, type, typeSupplement, shelterArea, shelterGalleryful, isShelterHaveLivingFacilities, shelterOriginalPurpose, shelterOriginalPurposeSupplement, measure, measureSecond, measureSupplement, reinforceTime, fortificationIntensity, pictureBeforeConstruction, pictureProcessConstruction, pictureCompleteConstruction, createUser, createId, createTime, status, reason, isSaveAll, delFlag);
    }
}
